package com.qidi.ssh.utils;

import java.io.File;
import java.util.UUID;

/**
 * @author zhouXinBin
 * @create 2020-10-19-16:24
 */
public class UploadUtils {
    public static String getUuidFileName(String filename){
        return UUID.randomUUID().toString().replace("-","")+filename.substring(filename.lastIndexOf("."));
    }

    public static String getPath(String fileName){
        int code = fileName.hashCode();
        int d1=code & 0xf;
        int code1 = code >>> 4;
        int d2 = code1 & 0xf;
        return File.separator+d1+File.separator+d2;
    }

}

